home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
diskutil
/
cache.arc
/
cache.h
< prev
next >
Wrap
C/C++ Source or Header
|
1989-03-22
|
847b
|
40 lines
/*
* Floppy Disk Cache (Atari ST)
*/
#ifndef NULL /* belong in <stddef.h> */
#define NULL 0L
typedef long size_t;
#endif
/* magic functions to return internal tables to cstat */
#define CSTAT -1 /* return address of cache tables */
#define CINIT -2 /* clear cache */
/* cache parameters */
#define NSECT (82*2*10) /* maximum sectors cached */
#define CYCLE 100 /* update interval */
#define A_INC 16 /* increment for each reference */
/* indices for stats array */
#define TOTAL 0
#define HITS 1
#define READS 2
#define WRITES 3
#define RECLMS 4
#define STATS 5 /* elements in stats */
#define NOBUF (-1) /* no cached sector */
/* per sector cache information */
typedef struct {
short avg; /* average usage */
short buf; /* index of cached sector in cbufs [] */
} Cache;
typedef struct {
char data [512];
} Sector;